<?php 
/**
 * TomatoCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version 	$Id: show.phtml 5129 2010-08-30 04:36:55Z huuphuoc $
 * @since		2.0.0
 */
?>
<div class="t_news_categorytree">
	<h2><?php echo $this->translator()->widget('title'); ?></h2>

    <?php foreach ($this->categories as $category) : ?>
	<div<?php if ($category->depth > 1) : ?> style="padding-left: <?php echo ($category->depth - 1) * 20; ?>px"<?php endif; ?>>
		<?php if ($category->depth == 0) : ?>
		<a href="<?php echo $this->url($category->getProperties(), 'news_article_category'); ?>"><?php echo $category->name; ?></a>
		<?php else : ?>
		<span>
			<a href="<?php echo $this->url($category->getProperties(), 'news_article_category'); ?>"><?php echo $category->name; ?></a>
		</span>
		<?php endif; ?>
	</div>
	<?php endforeach; ?>
</div>
